Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR targets to address the Linker errors mentioned in Issue #43092 when we build Node.JS main branch in MSVC 2022 (Version 17.4.4).
Then, it fixes the VS2022 ARM64 build issue with file access violation originally fixed by PR #46231.
The fix adds PCH file to
mksnapshotproject in thev8.gypfile to solve #43092.directory.build.propsis added to overridePreprocessedFileNameoutput path to address the file access violation issue.Details
When we build Node.JS Release in MSVC 2022 we see linker errors that
mksnapshotcannot findFixedArray::getmethod. This is an example of the linker error from issue #43092:It seemed that the inlined method
FixedArray::getis optimized out.We can either change V8 files and explicitly include
fixed-array-inl.hfile as in PR #46231, or we can use the forced file inclusion used by PCH files. Adding the MSVC specific PCH formksnapshotproject addresses the issue.The root cause of the access violation issue is that the
embedded.Sfile is generated in the$(IntDir)folder while the preprocessed file name uses exactly the same path:<PreprocessedFileName Condition="'%(PreprocessedFileName)' == ''">$(IntDir)%(FileName)%(Extension)</PreprocessedFileName>from"c:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\marmasm.props". Thus, we are getting error because we try to change theembedded.Sfile while reading it.In this PR we add new
directory.build.propsfile that locally overrides themarmasm.propsdefinition by adding.ppextension to the file name. It generates output file name that is different in from the input file name and addresses the file access violation issue.